package com.centanet.framework.network;

/**
 * Volley请求method int转String
 */
public final class VolleyMethodToString {

    private final int method;

    public VolleyMethodToString(int method) {
        this.method = method;
    }

    public String parse2Sting() {
        switch (method) {
            case 0:
                return "GET";
            case 1:
                return "POST";
            case 2:
                return "PUT";
            case 3:
                return "DELETE";
            case 4:
                return "HEAD";
            case 5:
                return "OPTIONS";
            case 6:
                return "TRACE";
            case 7:
                return "PATCH";
            default:
                return "DEPRECATED_GET_OR_POST";
        }
    }
}
